<template>
	<view class="uni-container">
		<view class="uni-hello-text">
			<text class="hello-text">以下是webrtc h5音视频聊天各个功能示例：</text>
		</view>
		
		<view class="uni-panel"
			v-for="item in rtcLists" :key="item.url">
			<view  class="uni-panel-h"
				@click="goDetailPage(item.url)">
				<text class="uni-panel-text">{{item.name}}</text>
				<uni-icons type="forward" size="30"></uni-icons>

			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				rtcLists: [{
						name: "打开摄像头",
						url: "/show/rtcdemo/opencamera/opencamera"
					},
					{
						name: "共享屏幕",
						url: "/show/rtcdemo/screenshare/screenshare"
					},
					{
						name: "视频滤镜效果",
						url: "/show/rtcdemo/videofilter/videofilter"
					},
					{
						name: "动态改变分辨率",
						url: "/show/rtcdemo/resoluction/resoluction"
					},
					{
						name: "音量检测示例",
						url: "/show/rtcdemo/audiovolume/audiovolume"
					},
					{
						name: "捕获画布为视频流",
						url: "/show/rtcdemo/capturecanvas/capturecanvas"
					},
					{
						name: "数据通道",
						url: "/show/rtcdemo/datachannel/datachannel"
					},
					{
						name: "p2p音视频webrtc举例",
						url: "/show/rtcdemo/p2p/p2p"
					},
					{
						name: "sfu音视频webrtc举例",
						url: "/show/rtcdemo/sfu/sfu"
					},
					{
						name: "记录",
						url: "/show/rtcdemo/doc/doc"
					},
					{
						name: "测试",
						url: "/show/rtcdemo/test/test"
					}
					
				]
			};
		},
		
		onLoad() {},
		onShareAppMessage() {
			return {
				title: '欢迎体验webrtc h5 音视频聊天',
				path: '/pages/show/show'
			}
		},
		methods: {
			goDetailPage(path) {
				const url = '/pages' + path
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style>
	@import '../../common/uni-nvue.css';
</style>
